﻿// =================================================================== 
// 项目说明,功能实体类,用CodeSmith自动生成。
// =================================================================== 
// 文件名: UsersEntity.cs
// 修改时间：2020-9-8 10:40:13
// 修改人: lixiong
// =================================================================== 
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using JX.Infrastructure.Attribute;
using JX.Infrastructure.Common;

namespace JX.Core.Entity
{
	/// <summary>
	/// 数据库表：Users 的实体类.
	/// </summary>
	[Table("Users")]
	public partial class UsersEntity
	{
		#region Properties
		private int? _userID = 0;
		/// <summary>
		/// 用户ID(主键)
		/// </summary>
		[Column("UserID",TypeName="int")]
		[Key]
		public int? UserID
		{
			get {return _userID;}
			set {_userID = value;}
		}
		
		private int? _groupID = 0;
		/// <summary>
		/// 用户组ID
		/// </summary>
		[Column("GroupID",TypeName="int")]
		public int? GroupID
		{
			get {return _groupID;}
			set {_groupID = value;}
		}
		
		private int? _companyID = 0;
		/// <summary>
		/// 对应企业ID
		/// </summary>
		[Column("CompanyID",TypeName="int")]
		public int? CompanyID
		{
			get {return _companyID;}
			set {_companyID = value;}
		}
		
		private int? _clientID = 0;
		/// <summary>
		/// 客户信息Id
		/// </summary>
		[Column("ClientID",TypeName="int")]
		public int? ClientID
		{
			get {return _clientID;}
			set {_clientID = value;}
		}
		
		private int? _userType = 0;
		/// <summary>
		/// 会员类别，0－个人会员 1企业会员(创建者) 2企业会员(管理员) 3企业会员(普通成员) 4 企业会员(待审核成员)
		/// </summary>
		[Column("UserType",TypeName="int")]
		public int? UserType
		{
			get {return _userType;}
			set {_userType = value;}
		}
		
		private System.String _userName = string.Empty;
		/// <summary>
		/// 用户名
		/// </summary>
		[Column("UserName",TypeName="nvarchar(20)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String UserName
		{
			get {return _userName;}
			set {_userName = value;}
		}
		
		private System.String _trueName = string.Empty;
		/// <summary>
		/// 用户真实姓名
		/// </summary>
		[Column("TrueName",TypeName="nvarchar(20)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String TrueName
		{
			get {return _trueName;}
			set {_trueName = value;}
		}
		
		private System.String _userPassword = string.Empty;
		/// <summary>
		/// 密码
		/// </summary>
		[Column("UserPassword",TypeName="nvarchar(32)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String UserPassword
		{
			get {return _userPassword;}
			set {_userPassword = value;}
		}
		
		private System.String _lastPassword = string.Empty;
		/// <summary>
		/// 随机密码
		/// </summary>
		[Column("LastPassword",TypeName="nvarchar(32)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String LastPassword
		{
			get {return _lastPassword;}
			set {_lastPassword = value;}
		}
		
		private System.String _question = string.Empty;
		/// <summary>
		/// 提示问题
		/// </summary>
		[Column("Question",TypeName="nvarchar(50)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String Question
		{
			get {return _question;}
			set {_question = value;}
		}
		
		private System.String _answer = string.Empty;
		/// <summary>
		/// 提示答案
		/// </summary>
		[Column("Answer",TypeName="nvarchar(50)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String Answer
		{
			get {return _answer;}
			set {_answer = value;}
		}
		
		private System.String _email = string.Empty;
		/// <summary>
		/// Email
		/// </summary>
		[Column("Email",TypeName="nvarchar(100)")]
		[RegularExpression(RegexHelper.EmailPattern, ErrorMessage = "Email格式不对")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String Email
		{
			get {return _email;}
			set {_email = value;}
		}
		
		private System.String _mobile = string.Empty;
		/// <summary>
		/// 手机号
		/// </summary>
		[Column("Mobile",TypeName="nvarchar(50)")]
		[RegularExpression(RegexHelper.MobilePattern, ErrorMessage = "手机号格式不对")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String Mobile
		{
			get {return _mobile;}
			set {_mobile = value;}
		}
		
		private int? _sex = 0;
		/// <summary>
		/// 性别
		/// </summary>
		[Column("Sex",TypeName="int")]
		public int? Sex
		{
			get {return _sex;}
			set {_sex = value;}
		}
		
		private DateTime? _regTime = null;
		/// <summary>
		/// 注册时间
		/// </summary>
		[Column("RegTime",TypeName="datetime")]
		public DateTime? RegTime
		{
			get {return _regTime;}
			set {_regTime = value;}
		}
		
		private DateTime? _joinTime = null;
		/// <summary>
		/// 加入某用户组的时间
		/// </summary>
		[Column("JoinTime",TypeName="datetime")]
		public DateTime? JoinTime
		{
			get {return _joinTime;}
			set {_joinTime = value;}
		}
		
		private int? _loginTimes = 0;
		/// <summary>
		/// 登录次数
		/// </summary>
		[Column("LoginTimes",TypeName="int")]
		public int? LoginTimes
		{
			get {return _loginTimes;}
			set {_loginTimes = value;}
		}
		
		private DateTime? _loginTime = null;
		/// <summary>
		/// 最后登录时间
		/// </summary>
		[Column("LoginTime",TypeName="datetime")]
		public DateTime? LoginTime
		{
			get {return _loginTime;}
			set {_loginTime = value;}
		}
		
		private DateTime? _presentTime = null;
		/// <summary>
		/// 最后赠送积分时间，用于每次登录赠送积分的设置
		/// </summary>
		[Column("PresentTime",TypeName="datetime")]
		public DateTime? PresentTime
		{
			get {return _presentTime;}
			set {_presentTime = value;}
		}
		
		private System.String _loginIP = string.Empty;
		/// <summary>
		/// 最后登录IP
		/// </summary>
		[Column("LoginIP",TypeName="nvarchar(255)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String LoginIP
		{
			get {return _loginIP;}
			set {_loginIP = value;}
		}
		
		private DateTime? _passwordChangedTime = null;
		/// <summary>
		/// 上次修改密码的时间
		/// </summary>
		[Column("PasswordChangedTime",TypeName="datetime")]
		public DateTime? PasswordChangedTime
		{
			get {return _passwordChangedTime;}
			set {_passwordChangedTime = value;}
		}
		
		private DateTime? _lockoutTime = null;
		/// <summary>
		/// 上次被锁定的时间
		/// </summary>
		[Column("LockoutTime",TypeName="datetime")]
		public DateTime? LockoutTime
		{
			get {return _lockoutTime;}
			set {_lockoutTime = value;}
		}
		
		private int? _loginFailedCount = 0;
		/// <summary>
		/// 使用无效密码登录的次数，正确登录后置为0
		/// </summary>
		[Column("LoginFailedCount",TypeName="int")]
		public int? LoginFailedCount
		{
			get {return _loginFailedCount;}
			set {_loginFailedCount = value;}
		}
		
		private DateTime? _firstFailedTime = null;
		/// <summary>
		/// 第一次使用无效密码登录的时间
		/// </summary>
		[Column("FirstFailedTime",TypeName="datetime")]
		public DateTime? FirstFailedTime
		{
			get {return _firstFailedTime;}
			set {_firstFailedTime = value;}
		}
		
		private int? _failedAnswerCount = 0;
		/// <summary>
		/// 使用无效答案找回密码的次数
		/// </summary>
		[Column("FailedAnswerCount",TypeName="int")]
		public int? FailedAnswerCount
		{
			get {return _failedAnswerCount;}
			set {_failedAnswerCount = value;}
		}
		
		private DateTime? _firstFailedAnswerTime = null;
		/// <summary>
		/// 第一次使用无效答案找回密码的时间
		/// </summary>
		[Column("FirstFailedAnswerTime",TypeName="datetime")]
		public DateTime? FirstFailedAnswerTime
		{
			get {return _firstFailedAnswerTime;}
			set {_firstFailedAnswerTime = value;}
		}
		
		private int? _userStatus = 0;
		/// <summary>
		/// 用户状态。0－－正常，1－－锁定，2－－未通过邮件验证，4－－未通过管理员认证 8－－未通过手机验证
		/// </summary>
		[Column("UserStatus",TypeName="int")]
		public int? UserStatus
		{
			get {return _userStatus;}
			set {_userStatus = value;}
		}
		
		private System.String _checkNum = string.Empty;
		/// <summary>
		/// 验证码。用于邮件验证
		/// </summary>
		[Column("CheckNum",TypeName="char(10)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String CheckNum
		{
			get {return _checkNum;}
			set {_checkNum = value;}
		}
		
		private System.Boolean _isResetPassword = false;
		/// <summary>
		/// 是否允许用户修改密码
		/// </summary>
		[Column("IsResetPassword",TypeName="bit")]
		public System.Boolean IsResetPassword
		{
			get {return _isResetPassword;}
			set {_isResetPassword = value;}
		}
		
		private System.String _userCultureName = string.Empty;
		/// <summary>
		/// 用户语言
		/// </summary>
		[Column("UserCultureName",TypeName="nvarchar(10)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String UserCultureName
		{
			get {return _userCultureName;}
			set {_userCultureName = value;}
		}
		
		private System.String _userFace = string.Empty;
		/// <summary>
		/// 用户头像
		/// </summary>
		[Column("UserFace",TypeName="nvarchar(255)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String UserFace
		{
			get {return _userFace;}
			set {_userFace = value;}
		}
		
		private int? _faceWidth = 0;
		/// <summary>
		/// 头像宽度
		/// </summary>
		[Column("FaceWidth",TypeName="int")]
		public int? FaceWidth
		{
			get {return _faceWidth;}
			set {_faceWidth = value;}
		}
		
		private int? _faceHeight = 0;
		/// <summary>
		/// 头像高度
		/// </summary>
		[Column("FaceHeight",TypeName="int")]
		public int? FaceHeight
		{
			get {return _faceHeight;}
			set {_faceHeight = value;}
		}
		
		private System.String _sign = string.Empty;
		/// <summary>
		/// 用户签名
		/// </summary>
		[Column("Sign",TypeName="nvarchar(MAX)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String Sign
		{
			get {return _sign;}
			set {_sign = value;}
		}
		
		private int? _privacySetting = 0;
		/// <summary>
		/// 隐私设置
		/// </summary>
		[Column("PrivacySetting",TypeName="int")]
		public int? PrivacySetting
		{
			get {return _privacySetting;}
			set {_privacySetting = value;}
		}
		
		private decimal? _balance = 0;
		/// <summary>
		/// 资金余额
		/// </summary>
		[Column("Balance",TypeName="money")]
		public decimal? Balance
		{
			get {return _balance;}
			set {_balance = value;}
		}
		
		private int? _userPoint = 0;
		/// <summary>
		/// 用户点券数
		/// </summary>
		[Column("UserPoint",TypeName="int")]
		public int? UserPoint
		{
			get {return _userPoint;}
			set {_userPoint = value;}
		}
		
		private int? _userExp = 0;
		/// <summary>
		/// 用户积分
		/// </summary>
		[Column("UserExp",TypeName="int")]
		public int? UserExp
		{
			get {return _userExp;}
			set {_userExp = value;}
		}
		
		private int? _consumeMoney = 0;
		/// <summary>
		/// 消费的金额
		/// </summary>
		[Column("ConsumeMoney",TypeName="int")]
		public int? ConsumeMoney
		{
			get {return _consumeMoney;}
			set {_consumeMoney = value;}
		}
		
		private int? _consumePoint = 0;
		/// <summary>
		/// 消费的点券数
		/// </summary>
		[Column("ConsumePoint",TypeName="int")]
		public int? ConsumePoint
		{
			get {return _consumePoint;}
			set {_consumePoint = value;}
		}
		
		private int? _consumeExp = 0;
		/// <summary>
		/// 消费的积分数
		/// </summary>
		[Column("ConsumeExp",TypeName="int")]
		public int? ConsumeExp
		{
			get {return _consumeExp;}
			set {_consumeExp = value;}
		}
		
		private int? _postItems = 0;
		/// <summary>
		/// 添加的信息数
		/// </summary>
		[Column("PostItems",TypeName="int")]
		public int? PostItems
		{
			get {return _postItems;}
			set {_postItems = value;}
		}
		
		private int? _passedItems = 0;
		/// <summary>
		/// 审核通过的信息数
		/// </summary>
		[Column("PassedItems",TypeName="int")]
		public int? PassedItems
		{
			get {return _passedItems;}
			set {_passedItems = value;}
		}
		
		private int? _rejectItems = 0;
		/// <summary>
		/// 被退稿的信息数
		/// </summary>
		[Column("RejectItems",TypeName="int")]
		public int? RejectItems
		{
			get {return _rejectItems;}
			set {_rejectItems = value;}
		}
		
		private int? _deleteItems = 0;
		/// <summary>
		/// 被删除的信息数
		/// </summary>
		[Column("DeleteItems",TypeName="int")]
		public int? DeleteItems
		{
			get {return _deleteItems;}
			set {_deleteItems = value;}
		}
		
		private DateTime? _endTime = null;
		/// <summary>
		/// 有效期开始计算时间
		/// </summary>
		[Column("EndTime",TypeName="datetime")]
		public DateTime? EndTime
		{
			get {return _endTime;}
			set {_endTime = value;}
		}
		
		private System.Boolean _isInheritGroupRole = false;
		/// <summary>
		/// 是否继承用户组权限，默认为true
		/// </summary>
		[Column("IsInheritGroupRole",TypeName="bit")]
		public System.Boolean IsInheritGroupRole
		{
			get {return _isInheritGroupRole;}
			set {_isInheritGroupRole = value;}
		}
		
		private System.String _userSetting = string.Empty;
		/// <summary>
		/// 用户权限
		/// </summary>
		[Column("UserSetting",TypeName="nvarchar(MAX)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String UserSetting
		{
			get {return _userSetting;}
			set {_userSetting = value;}
		}
		
		private System.String _userFriendGroup = string.Empty;
		/// <summary>
		/// 用户好友组
		/// </summary>
		[Column("UserFriendGroup",TypeName="nvarchar(255)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String UserFriendGroup
		{
			get {return _userFriendGroup;}
			set {_userFriendGroup = value;}
		}
		
		private System.String _payPassword = string.Empty;
		/// <summary>
		/// 支付密码
		/// </summary>
		[Column("PayPassword",TypeName="nvarchar(32)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String PayPassword
		{
			get {return _payPassword;}
			set {_payPassword = value;}
		}
		
		private System.Boolean _isShowUpgradeTipsFalse = false;
		/// <summary>
		/// 是否不再显示用户升级提示信息，默认为false
		/// </summary>
		[Column("IsShowUpgradeTipsFalse",TypeName="bit")]
		public System.Boolean IsShowUpgradeTipsFalse
		{
			get {return _isShowUpgradeTipsFalse;}
			set {_isShowUpgradeTipsFalse = value;}
		}
		
		private DateTime? _lastAddPointTime = null;
		/// <summary>
		/// 上次添加点券的时间
		/// </summary>
		[Column("LastAddPointTime",TypeName="datetime")]
		public DateTime? LastAddPointTime
		{
			get {return _lastAddPointTime;}
			set {_lastAddPointTime = value;}
		}
		
		private int? _qAPoint = 0;
		/// <summary>
		/// 问答积分
		/// </summary>
		[Column("QAPoint",TypeName="int")]
		public int? QAPoint
		{
			get {return _qAPoint;}
			set {_qAPoint = value;}
		}
		
		private System.String _getPasswordSid = string.Empty;
		/// <summary>
		/// 取回密码随机串
		/// </summary>
		[Column("GetPasswordSid",TypeName="nvarchar(32)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String GetPasswordSid
		{
			get {return _getPasswordSid;}
			set {_getPasswordSid = value;}
		}
		
		private DateTime? _getPasswordTime = null;
		/// <summary>
		/// 上次取回密码时间
		/// </summary>
		[Column("GetPasswordTime",TypeName="datetime")]
		public DateTime? GetPasswordTime
		{
			get {return _getPasswordTime;}
			set {_getPasswordTime = value;}
		}
		
		private int? _honorType = 0;
		/// <summary>
		/// 用户问答头衔
		/// </summary>
		[Column("HonorType",TypeName="int")]
		public int? HonorType
		{
			get {return _honorType;}
			set {_honorType = value;}
		}
		
		private decimal? _frozenBalance = 0;
		/// <summary>
		/// 冻结金额
		/// </summary>
		[Column("FrozenBalance",TypeName="money")]
		public decimal? FrozenBalance
		{
			get {return _frozenBalance;}
			set {_frozenBalance = value;}
		}
		
		private decimal? _creditLines = 0;
		/// <summary>
		/// 授信额度
		/// </summary>
		[Column("CreditLines",TypeName="money")]
		public decimal? CreditLines
		{
			get {return _creditLines;}
			set {_creditLines = value;}
		}
		
		#endregion
	}
}
